package rmichat;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.*;
import javax.swing.JTextArea;

public class ChatListenerImpl extends UnicastRemoteObject implements ChatListener {

  JTextArea display;

  ChatListenerImpl(JTextArea jt) throws RemoteException {
    display = jt;
  }

  public void messageReceived(String author, String message) throws RemoteException {
    display.append(author+">> "+ message+"\n");
  }
}

